package com.spring.ServiceImpl;

import com.spring.mapper.UserMapper;
import com.spring.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    public void add(User user) {
        userMapper.add(user);
    }

    public List<User> listUser() {
        return userMapper.findList();
    }

    public User login(User user) {
        return userMapper.login(user);
    }

    public void del(int id) {
        userMapper.del(id);
    }
}
